package com.demo.demok4j.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author lzh
 * @date 2020/8/6 - 9:44
 */
@Repository
public class ApiDao {
    @Autowired
    private JdbcTemplate jdbcTemplate;

    /**
     * 获取所有api
     */
    public List<String> getApiPaths() {
        String sql = "select path from api";
        return jdbcTemplate.queryForList(sql, String.class);
    }
}
